﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <title></title>
	<meta charset="utf-8" />
</head>
<body>
    <link href="../css/uploader-image.css" rel="stylesheet" type="text/css" />

    <div>
        <a id="upload-target" class="x-button">添加图片并上传</a>
    </div>
    <div id="upload-view"></div>
    <script type="text/javascript" src="/js/Q.js"></script>
    <script type="text/javascript" src="/js/Q.Uploader.js"></script>
    <script type="text/javascript" src="/js/Q.Uploader.UI.js"></script>

    <script type="text/javascript">
        var uploader = new Q.Uploader({
            url: "api/upload.ashx",
            target: document.getElementById("upload-target"),
            view: document.getElementById("upload-view"),
            //auto: false,

            //图片缩放
            scale: {
                //要缩放的图片格式
                types: ".jpg,.png,.gif",
                //最大图片大小(width|height)
                maxWidth: 1024
            }
        });
    </script>
</body>
</html>
